<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@taglib uri="/struts-tags" prefix="s"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OA协同办公系统</title>
<link type="text/css" rel="stylesheet" href="css/table.css">
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/openwindow.js"></script>
<script type="text/javascript" src="js/file.js"></script>
<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript" language="javascript"></script>
		<style type="text/css">
		body,td,th {	
			background-color:white;
			font-family: "宋体";
			font-size: 12px;
		}
		.sendtd{border-bottom:#F00 double 1px}
		.ztable{margin:15px 0 15px 0}
		</style>
	<script type="text/javascript">
	
	function printDoc(){
			window.print();
		}
	
	function wordlook(val) {
	var url = "wordLook.action?document.id="+val;
	openWindow(url, 750, 700);
}

function flowLook(val) {
	var url = "flowLook.action?flowId="+val;
	openWindow(url, 680, 600);
}
function download(val,files) {
	var fileId = $("#"+files).val();
	if (fileId != "" && fileId != "null") {
		var param = {"fileArray":fileId};
		$.post("getFileList.action", param, function (data) {
			var list = data.fileList;
			for (var i = 0; i < list.length; i++) {
				$("#"+val).prepend("<tr><td><input type=\"checkbox\" name=\"checkbox2\" id=\"" + list[i].id + "\" value=\"" + list[i].id + "\" />&nbsp;<a href=\"downLoadFile.action?fileId=" + list[i].id + "\">" + list[i].name + "</a>&nbsp;</tr>");
			}
		}, "json");
	}
}
</script>
  </head>
  
<body onload="download('filetable','fileArray');download('zhengwentable','textId');">
<form action="" method="post" name="documentForm" >
<div style="margin-top: 10px;"> &nbsp;&nbsp;
	<input type="button" class="button_04"  value="流程查看" onclick="flowLook('${document.processId}');" />
	<input type="button" class="button_04"  value="打印" onclick="printDoc();" />
</div>
<div align="center"><h1 align="center"style="font-weight:bold">${document.flowName}</h1></div>
<input type="hidden" name="document.textId" id="textId" value="${document.textId}">
<input type="hidden" name="document.fileArray" id="fileArray" value="${document.fileArray}">
<input type="hidden" id="docId" name="document.id" value="${document.id}">
<input type="hidden" name="document.flowId" value="${flowId}">
<table align="center" border="0" cellspacing="1" cellpadding="0" width="57%">
<tr>
<td width="60px">正文：</td>
<td colspan="7">
	<table id="zhengwentable">
	
	</table></td>
</tr>
<tr>
<td width="60px">附件：</td>
<td colspan="7">
	<table id="filetable">
	</table></td>
</tr>
</table>
<table align="center" style="margin-top:10px; background:#000;"width="900" border="0" cellspacing="1" cellpadding="0">
<tr height="20px">
    <td width="60">类型：</td>
    <td colspan="7" >${document.type}</td>
  </tr>
  <tr height="20px">
    <td width="60px">编号：</td>
    <td width="200px">
     ${document.postFont1}${document.postFont2}${document.postFont3}号
    </td>
    <td width="63">来文单位：</td>
    <td colspan="3">${document.fromDept}</td>
    <td width="67">文号：</td>
    <td width="335">${document.articleNumber }</td>
  </tr>
  <tr height="20px">
    <td>标题：</td>
    <td colspan="7">${document.title }</td>
  </tr>
  <tr height="20px">
    <td>密级：</td>
    <td>${document.mjStatu}</td>
    <td>份数：</td>
    <td width="63">${document.print}</td>
    <td width="64">缓急程度：</td>
    <td width="79">${document.hjStatu }</td>
    <td>来文日期：</td>
    <td>${document.printTime}</td>
  </tr>
  <tr>
    <td height="100" align="center">
       <p>&nbsp;</p>
    	拟<br><br>
    	办<br><br>
         意<br><br>
    	见
   	 <p>&nbsp;</p>
   </td>
    <td colspan="7" valign="top" >
    &nbsp;&nbsp;${document.nbyj}
    </td>
  </tr>
   <tr>
    <td height="100" align="center">
    <p>&nbsp;</p>
        部<br><br>
        门<br><br>
        负<br><br>
        责<br><br>
        人<br><br>
        意<br><br>
        见
      <p>&nbsp;</p>
    </td>
    <td colspan="7" valign="top">
    &nbsp;&nbsp;${document.dcdb}
    </td>
  </tr>
   <tr>
    <td height="100" align="center">
   <p>&nbsp;</p>
        局<br><br>
        领<br><br>
        导<br><br>
        批<br><br>
        示
     <p>&nbsp;</p>
    </td>
    <td colspan="7" valign="top">
    &nbsp;&nbsp;${document.ldps}
    </td>
  </tr>
  <tr>
    <td height="100" align="center">
      <p>&nbsp;</p>
        办<br><br>
        理<br><br>
        情<br><br>
        况<br><br>
     <p>&nbsp;</p>
    </td>
    <td colspan="7" valign="top">
   &nbsp;&nbsp;${document.blqk }
    </td>
  </tr>
  <tr>
    <td height="80" align="center">
       <p>&nbsp;</p>
         备<br><br>
         注
     <p>&nbsp;</p>
   </td>
    <td colspan="7">
     <p>&nbsp;</p>&nbsp;&nbsp;
    <textarea id="bz" readonly="readonly" name="document.beizhu" style=" width:500px; height:70px; background:none; border:0; overflow:hidden">${document.beizhu }</textarea>
    </td>
  </tr>
   <tr>
    <td height="80" align="center">
         查<br>阅<br>详<br>情
      
   </td>
    <td colspan="7" style="overflow: scroll;" valign="top">
    <p>
    	<c:forEach items="${downList}" var="doc">
    		<c:if test='${doc.isRead=="0"}'>
    	     ${doc.name}&nbsp;&nbsp;<font color="red">未查阅</font>&nbsp;&nbsp;&nbsp;&nbsp;
    		</c:if>
    		<c:if test='${doc.isRead=="1"}'>
    	     ${doc.name}&nbsp;&nbsp;已查阅&nbsp;&nbsp;&nbsp;&nbsp;
    		</c:if>
    	</c:forEach>
    	</p>
    </td>
  </tr>
  <tr height="10"><td style="color: red;" colspan="8">${document.supervision }</td></tr>
</table>
</form>
</body>
</html>